<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{pcPurchaseReqItemBean.id}"/>
		<f:event type="preRenderView" listener="#{pcPurchaseReqItemBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Pc Purchase Req Item"/>

	<ui:define name="header">
		Pc Purchase Req Item
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty pcPurchaseReqItemBean.id}">
				Edit existing Pc Purchase Req Item
			</c:when>
			<c:otherwise>
				Create a new Pc Purchase Req Item
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemMmItem" value="Mm Item:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{mmItemBean.converter}" id="pcPurchaseReqItemBeanPcPurchaseReqItemMmItem" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.mmItem}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{mmItemBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemMmItem" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPcPurchaseReq" value="Pc Purchase Req:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{pcPurchaseReqBean.converter}" id="pcPurchaseReqItemBeanPcPurchaseReqItemPcPurchaseReq" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.pcPurchaseReq}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{pcPurchaseReqBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPcPurchaseReq" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemSysUom" value="Sys Uom:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysUomBean.converter}" id="pcPurchaseReqItemBeanPcPurchaseReqItemSysUom" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.sysUom}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysUomBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemSysUom" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrSupplierItemCode" value="Pr Supplier Item Code:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrSupplierItemCode" maxLength="50" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prSupplierItemCode}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrSupplierItemCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrItemCode" value="Pr Item Code:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrItemCode" maxLength="50" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prItemCode}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrItemCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrItemDescr" value="Pr Item Descr:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrItemDescr" maxLength="300" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prItemDescr}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrItemDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrQty" value="Pr Qty:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrQty" required="true" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prQty}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrQty" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrPpu" value="Pr Ppu:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrPpu" required="true" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prPpu}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrPpu" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrStatusIncVat" value="Pr Status Inc Vat:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrStatusIncVat" required="true" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prStatusIncVat}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrStatusIncVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrVatPercVal" value="Pr Vat Perc Val:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrVatPercVal" required="true" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prVatPercVal}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrVatPercVal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrVatVal" value="Pr Vat Val:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrVatVal" required="true" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prVatVal}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrVatVal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrTotalPriceExcVat" value="Pr Total Price Exc Vat:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrTotalPriceExcVat" required="true" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prTotalPriceExcVat}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrTotalPriceExcVat" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="pcPurchaseReqItemBeanPcPurchaseReqItemPrTotalPrice" value="Pr Total Price:"/>
				<h:panelGroup>
					<h:inputText id="pcPurchaseReqItemBeanPcPurchaseReqItemPrTotalPrice" required="true" value="#{pcPurchaseReqItemBean.pcPurchaseReqItem.prTotalPrice}"/>
					<h:message for="pcPurchaseReqItemBeanPcPurchaseReqItemPrTotalPrice" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{pcPurchaseReqItemBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty pcPurchaseReqItemBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{pcPurchaseReqItemBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{pcPurchaseReqItemBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>